#ifndef __MY_LOG_H__
#define __MY_LOG_H__

#include "zlog.h"
#include "my_level.h"

#define LOG_CAT_NAME "my_cat"
#define LOG_CFG_PATH "/etc/config/zlog.conf"
#define LOG_NAND_PATH "/root/pcs/"
#define LOG_RAM_PATH "/tmp/pcs/"

extern zlog_category_t *g_zc;

int log_init(void);
void log_deinit(void);

#define log_fatal(format, args...) zlog_fatal(g_zc, format, ##args)
#define log_error(format, args...) zlog_error(g_zc, format, ##args)
#define log_warn(format, args...) zlog_warn(g_zc, format, ##args)
#define log_notice(format, args...) zlog_notice(g_zc, format, ##args)
#define log_boot(format, args...) zlog_boot(g_zc, format, ##args)
#define log_cmd(format, args...) zlog_cmd(g_zc, format, ##args)
#define log_info(format, args...) zlog_info(g_zc, format, ##args)
#define log_debug(format, args...) zlog_debug(g_zc, format, ##args)

#endif /* __MY_LOG_H__ */